<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="http://jquery-ui.googlecode.com/svn/trunk/themes/base/jquery.ui.all.css" type="text/css" />

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>

    <script type="text/javascript">
      $(function() {
        $("#resizable").resizable({
          handles: 'ne, nw, se, sw',
          containment: 'parent',
          aspectRatio: true
        });
      });
    </script>


    <style type="text/css">
    #container {
      position: relative;
      width: 600px;
      height: 300px;
      border: 1px solid black;
    }

    #resizable {
      top: 50px;
      left: 50px;
      background: #cec;
      height: 100px;
      width: 200px;
      border: 1px dotted gray;
    }

    .ui-resizable-handle {
      width: 8px;
      height: 8px;
      border: 1px solid rgb(128, 128, 128);
      background: rgb(242, 242, 242);
    }

    .ui-resizable-n, .ui-resizable-s {
      left: 45%;
    }

    .ui-resizable-e, .ui-resizable-w {
      top: 45%;
    }

    .ui-resizable-se {
      bottom: -5px;
      right: -5px;
    }
    </style>
  </head>
  <body>
    <div id="container">
      <div id="resizable" />
    </div>
  </body>
</html>